The verification code is a mechanism for effectively verifying whether a visit request is sent by a computer or a human being, which can prevent malicious visit requests launched through a terminal to a server, such as malicious crack of passwords, repeated voting and spamming in forums, effectively improving the network security of the server. In a current verification code mechanism, a verification question and a verification code corresponding to the verification question are sent to a terminal, where the verification code includes multiple images corresponding to the verification question, for a user to select image(s) in the verification code in response to the verification question and return, as a result, to the server, so that the server can run statistics on the returned result and determine whether the result passes the verification.
Conventionally, the process of generating a verification code corresponding to a verification question includes the following: storing related images corresponding to each verification question in a server, where the images include images with label of “yes”, i.e., the correct answer to the verification question, and images with label of “no”, i.e., wrong answers to the verification question; and pre-selecting, by the server, a predetermined number of images to be a verification code, where the images as selected include at least one image carrying the correct answer, and recording information of a position of the correct answer in the verification code. When opening a webpage with a verification code, a terminal will send multiple requests to the server for drawing verification codes. The server randomly selects a verification code from generated in advance verification codes, sends the verification code and a verification question to the terminal, and determines, based on pre-stored information of the position, whether the verification for the verification code is passed when the terminal returns a result.
There is a need for a secure, fast and low-overhead verification method in the field.